package com.eliza.lifecycle.observer

import android.util.Log
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent


/*-*- coding:utf-8 -*-
 * @Author  : debi
 * @Time    : 3/23/22
 * @Software: Android Studio
 */
class NoteLcObserver : LifecycleObserver {
    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    fun create() {
        Log.e(this::class.java.name, "观察者调用了create方法")
    }


    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    fun start() {
        Log.e(this::class.java.name, "观察者调用了Start方法")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    fun pause() {
        Log.e(this::class.java.name, "观察者调用了pause方法")
    }

}